{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pandas version: 1.0.5, matplotlib version: 3.2.2\n"
     ]
    }
   ],
   "source": [
    "print(f\"Pandas version: {pd.__version__}, matplotlib version: {matplotlib.__version__}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## example 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>age</th>\n",
       "      <th>gender</th>\n",
       "      <th>state</th>\n",
       "      <th>num_children</th>\n",
       "      <th>num_pets</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>john</td>\n",
       "      <td>23</td>\n",
       "      <td>M</td>\n",
       "      <td>california</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>mary</td>\n",
       "      <td>78</td>\n",
       "      <td>F</td>\n",
       "      <td>dc</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>peter</td>\n",
       "      <td>22</td>\n",
       "      <td>M</td>\n",
       "      <td>california</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>jeff</td>\n",
       "      <td>19</td>\n",
       "      <td>M</td>\n",
       "      <td>dc</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>bill</td>\n",
       "      <td>45</td>\n",
       "      <td>M</td>\n",
       "      <td>california</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>lisa</td>\n",
       "      <td>33</td>\n",
       "      <td>F</td>\n",
       "      <td>texas</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>jose</td>\n",
       "      <td>20</td>\n",
       "      <td>M</td>\n",
       "      <td>texas</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name  age gender       state  num_children  num_pets\n",
       "0   john   23      M  california             2         5\n",
       "1   mary   78      F          dc             0         1\n",
       "2  peter   22      M  california             0         0\n",
       "3   jeff   19      M          dc             3         5\n",
       "4   bill   45      M  california             2         2\n",
       "5   lisa   33      F       texas             1         2\n",
       "6   jose   20      M       texas             4         3"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'name':['john','mary','peter','jeff','bill','lisa','jose'],\n",
    "    'age':[23,78,22,19,45,33,20],\n",
    "    'gender':['M','F','M','M','M','F','M'],\n",
    "    'state':['california','dc','california','dc','california','texas','texas'],\n",
    "    'num_children':[2,0,0,3,2,1,4],\n",
    "    'num_pets':[5,1,0,5,2,2,3]\n",
    "})\n",
    "df[['name','age','gender','state','num_children','num_pets']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2ed83d8a20>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEHCAYAAACk6V2yAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAS4ElEQVR4nO3dfYxc1X3G8efB3i3bgItSjxKEiSc0FMkgXszYgkKihGLJQGKihKg4DYRqW6tNKFBSRSVIJYnUP1CjipJQpS5LQhPYUCWBUgoJbjEhNAG8BhvjEBAlaxUayQMIY8Bl1/DrH/euve97Z3fuvBx/P9Lqzpy5c8+Pg+fZs2fv3uuIEAAgPYe1uwAAQDkIeABIFAEPAIki4AEgUQQ8ACRqcbsLGG/p0qVRrVbbXQYAdJWtW7e+FBGVye0dFfDValVDQ0PtLgMAuortXdO1s0QDAIki4AEgUQQ8ACSKgAeARBHwAJCoUs+isT0saa+ktyXtj4hamf0BpajXpeFhqVqVKlPORMNkjFfHaMUM/iMRcSrhjq40OCgtXy6tWZNtBwfbXVFnY7w6isu8XHA+g69FxEtF9q/VasF58OgY9XoWUvv2HWzr65N27WJmOh3Gq21sb51uEl32DD4k3W97q+0NMxS2wfaQ7aF6vV5yOUADhoel3t6JbT09WTumYrw6TtkBf3ZErJR0nqTP2/7Q5B0iYmNE1CKiVuG7PDpJtSqNjExsGx3N2jEV49VxSg34iHgx3+6WdKek1WX2BzRVpSINDGTLDEuWZNuBAZYbZsJ4dZzS1uBtv0vSYRGxN3+8Sd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Hp5OneYPtIScdExJ2SFBH/l7dL0mMR8UL+fFve/8Mz9P1BSXdGxJv5/pMviHdHvj1B2TeiTXkfi3TwG4okjV01ssh/LzAFAY9u8da4x29L6lN2oaixn0IPn2X/d8Y9f0fz+3c/uf+FfHbeyLeWtDMizpyjz4X2h0MUSzToZsM6eB3vixZ6sHzG/4Ltj0sHboD8m/M41EOSPp7/nuBISR+bYb9nJFVsn5n31+M23L0K6SLg0c2+puwSuU9IatbNLS5RdinZJyX9TNJ7Gz1Afv/UO5TdfP0+ZfcLmG6/EWXfmK63vV3SNmXr/kBTcLlgAEgUM3gASBS/uMEhyfZNmnqq499HxLfaUQ9QBpZoACBRLNEAQKIIeABIFAEPAIki4AEgUf8P+OvBAaD2ujEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.plot(kind='scatter',x='num_children',y='num_pets',color='red')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2ed5cd2668>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAEXCAYAAAC06B/dAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAX/UlEQVR4nO3df5RcZZ3n8fdHCIZIhPzozbBkYmckgIGBIJ1MWJgF+SUOMxKWHwszy0Q2mrMzy4qw60x0nKOzztnFI7uscFw5cYJmGEWQHwOOBzVEcGaQoEkIIgkIImDYQHoivxUw5LN/3Nuk6XTS1dVdVf2Ez+ucPlX31r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/d73lMk3S1praSvS9qnY28yggR47L5mAZ+3fSjwLHAmcJPtufUVmzZQXci4zyTgaOBi4Faq65QeCvy2pDmSpgKfAE6qL9q8Grikbe8mYhCZiRm7q5/ZXlffXwN0A4dJ+mtgP2Af4Nv9tv+GbdfXaXza9v0Akh6o950OzKa6ChHAXsDdbXgfETuVAI/d1Sv97r8G7A18GVhg+z5JHwCOH2T7bQP23Ub1/+Q1YIXt81pUb8SwpQsl3kwmApskjQP+aJj7rgKOkXQggKS3STpotAuMGI4EeLyZ/CVwD3AX8OBwdrTdC3wAuFbSj6i6Tw4Z7QIjhiNT6SMiCpUWeEREoRLgERGFSoBHRBQqAR4RUagEeEREoRLgERGFSoBHRBQqAR4RUaj/D5sgOsPB3wPOAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.plot(kind='bar',x='name',y='age')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAEGCAYAAABM7t/CAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3dd3yUVfb48c9NDxBCCzVAUJAWIEDoIAFBQZESbCiu2LAgWNbVdVddy7qr+/XnuiJ2pVpQOoh9Qgmh14SA0kJvoYYSQpL7++NONEDKTDIzz8zkvF8vXgnJzDxnSObwzHnOPVdprRFCCOG9AqwOQAghRMkkUQshhJeTRC2EEF5OErUQQng5SdRCCOHlgtzxoLVq1dIxMTHueGghhPBLa9euzdRaRxX1Pbck6piYGNasWeOOhxZCCL+klNpd3Pek9CGEEF5OErUQQng5SdRCCOHl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 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.clf()\n",
    "# gca stands for 'get current axis'\n",
    "ax = plt.gca()\n",
    "\n",
    "df.plot(kind='line',x='name',y='num_children',ax=ax)\n",
    "df.plot(kind='line',x='name',y='num_pets', color='red', ax=ax)\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2ed5c2dcc0>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAErCAYAAADOu3hxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAASNklEQVR4nO3de6xlZX3G8e8jg3hDUOeoCAxDAxrxCo4IRVMvtQG8oPWGjaLWdlKqoi0mommwkjbVGrVVrGSiFlGqFm+dCmqskKBWkZkBhpuaUTGA04qgw83b6K9/7DX25HjO7H1m1jlL3v39JDtnvet9Z6/fcYfH97x7XVJVSJLu+u42dAGSpH4Y6JLUCANdkhphoEtSIwx0SWqEgS5JjVgx1IFXrlxZq1evHurwknSXtHHjxh9V1cx8fYMF+urVq9mwYcNQh5eku6Qk31+ozyUXSWqEgS5JjTDQJakRBrokNcJAl6RGjA30JPdI8o0kVyS5Oslb5hmzV5KPJ9mS5JIkq5eiWEnSwiaZof8ceGpVPQZ4LHBskqPmjHkl8OOqOgR4F/C2fsuUJI0zNtBr5PauuWf3mnsT9ROAD3XbnwCeliS9VSlJGmuiC4uS7AFsBA4B3ltVl8wZsj9wPUBVbU+yDXgA8KM577MWWAuwatWq3at8kVafd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FrWlwJPD3J25I8qaq2zTPmhUk2AZcBj2D0oJK5jur2fzXJ5cDLgIOWqmhpMbxSVFOhqr6d5AjgeEZ3xfzS7P4kBwOvBx5fVT9Ocjaznjo1eyjwxap68VLXLC2WM3RNhSQPAe6sqo8AbweOAG4D9u6G3Be4A9iW5EHAcbP++exxXweOSXJI9773TvLQZfgVpLGcoWtaPAp4e5JfM3oQycnA0cDnk/ygqp6S5DLgm8D1wFdn/dt1c8a9HPhokr26/r8Bvr1cv4i0EL8UlaRGuOQiSY0w0CWpEQa6JDXCQJekRhjoktQIA12SGmGgS1IjDHRJasT/AWq41Pmh+MT6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.groupby('state').size().plot(kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAErCAYAAADOu3hxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAWvElEQVR4nO3df5BdZZ3n8feHJBAEJhmhxwFCTCxiymAChoAgihmUFVCDrjCSLQQGd1OrIrILVeq4pYi7tevq6Kq4UqmBVUdEFhRBwZliBQsFRAiSGAJMRQeLaBZi0EiEQILf/aNvsl1tJ32TnO5Lzn2/qm71Ped57rnfm1v59NPP+ZWqQpK059ur1wVIkpphoEtSSxjoktQSBroktYSBLkktYaBLUktM7NUbH3TQQTVjxoxevb0k7ZGWLVv2m6oaGKmtZ4E+Y8YM7rvvvl69vSTtkZL8cnttTrlIUksY6JLUEga6JLVEz+bQJWk8bd68mTVr1rBp06Zel9KVyZMnM23aNCZNmtT1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ztr+Pa1CUl9zykWSWsIRegOSfH5H7VV14XjVIql/GejNWNbrAiTJKRdJaglH6A1KMgB8EJgDTN66vqpO6llRkvqGJxY162rgIWAm8HHgUeDeXhYkqX845dKgIdd02XaltyT3VpU3jpY05pxyadbmzs+1Sd4M/Bp4cQ/rkdRHDPRm/efOFeAuBr4A/BlwUW9LktQvnENv1pkMTmOtrKq/YvCWWG/vcU2S+oSB3qx5VfW7rQudazK/qof1SOojBnqz9kry51sXkrwYp7UkjRPDpll/B9yd5LrO8pnAf+lhPZL6iIctNizJHGDriUS3VdWqXtYjqX8Y6JLUEs6hS1JLGOiS1BIGuvpWkouSvKipflKvOYeuvpXkUWBBVf2miX5SrzlCV19Isl+Sm5MsT7IyyceAQ4Dbk9ze6fOlJPcleTDJxzvrLhyh379KcneS+5Ncl8R7yeoFwRG6+kKSdwCnVNW/6yxPAZYzZOSd5MVV9WSSCcD3gQurasXQEXqSg4BvAadW1R+SfBDYp6ou68XnkoZyhK5+8TPg5CSfTPK6qtowQp+/TnI/8FPgCAZvVDLccZ31dyZ5ADgXeOlYFS3tDM8UVV+oqn9OMh84jcGrYn5/aHuSmcAlwDFV9dskX2bIXaeGdgVurarFY12ztLMcoasvJDkEeLqqvgZ8CpgPPAUc0OnyZ8AfgA1JXgKcOuTlQ/v9GDghyeGd7e6X5OXj8BGkUTlCV7+YC3wqyR8ZvBHJe4DjgX9M8uuq+qskPwUeBh4D7hzy2qXD+p0HXJNkn077fwL+ebw+iLQ97hSVpJZwykWSWsJAl6SWMNAlqSUMdElqCQNdklrCQJekljDQJaklDHRJaon/ByoOdLbxe0OyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.groupby(['state','gender']).size().unstack().plot(kind='bar',stacked=True)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Figure size 432x288 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaIAAAEFCAYAAAChEuM5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAASxUlEQVR4nO3dfZTVdZ3A8feHcXIE2iBBZKUBdcvQQR4cRNOhRBSUUvFhxSxkiUEXUdfqbLanDDt11tIl1odVsQfF58Qg8zELXDAfEhBERMMHbGFJV1dRBEzgu3/MyKIwzEXu5Xvlvl/ncLxz7+9+53M9h/Pm9zC/iZQSkiTl0ib3AJKkymaIJElZGSJJUlaGSJKUlSGSJGVliCRJWe1SikU7deqUevToUYqlJUkfQXPnzn01pdR5S6+VJEQ9evRgzpw5pVhakvQRFBEvtfSah+YkSVkZIklSVoZIkpSVIZIkZWWIJElZFXTVXEQsBd4C1gPrUkr1pRxKklQ5tuXy7SNSSq+WbBJJUkXy0JwkKatC94gS8NuISMA1KaXJH9wgIsYCYwFqa2uLN6GkrHpd3yv3CBVv4RkLc49QUoXuER2eUuoHHAOcHREDP7hBSmlySqk+pVTfufMW7+IgSdJmCgpRSml5839fAaYBB5dyKElS5Wg1RBHRLiI+/t5j4GjgqVIPJkmqDIWcI+oCTIuI97a/OaV0X0mnkiRVjFZDlFJ6Aei9A2aRJFUgL9+WJGVliCRJWRkiSVJWhkiSlJUhkiRlZYgkSVkZIklSVoZIkpSVIZIkZWWIJElZGSJJUlaGSJKUlSGSJGVliCRJWRkiSVJWhkiSlJUhkiRlZYgkSVkZIklSVoZIkpSVIZIkZWWIJElZGSJJUlaGSJKUlSGSJGVliCRJWRkiSVJWhkiSlJUhkiRlZYgkSVkZIklSVoZIkpRVwSGKiKqIeCIi7irlQ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z4cNq1a0f79u058cQTmT17NgDdu3fnkEMO2bjt3nvvTZ8+fQA46KCDWLp06WbrzZw5kwEDBtCrVy9mzJixTbNsTashSinNAv63KN9NkrRNLr7wW4wfP56FCxdyzTXXbPPP6LSkXbt27/t611133fi4qqqKdevWve/1tWvXMm7cOKZOncrChQtpbGws2iyeI5KkMnHw5xr47d2/5o3Xm/7tv/L113nrrTfZa6+9ALj++uu3ab2GhgamT5/O6tWrefvtt5k2bRoNDQ0farb3otOpUydWrVq18bxRMRTtqrmIGAuMBaitrS3WslksfPHPuUeQVAaKebl1If5uv540nvMNRp88jKqqKj57wIH84/kXcMopp9CxY0cGDRrEiy++WPB6/fr1Y9SoURx88MEAjBkzhr59+27xsFtrOnToQGNjI3V1dey55570799/m9doSRRy1UNE9ADuSinVFbJofX19mjNnzvZNltOET+SeQAATVuaeQECPC+7OPcIOc+1xXelSu0/uMTZz4EfkXnPvWbx4MT179nzfcxExN6VUv6XtPTQnScqqkMu3bwEeAfaLiGUR8bXSjyVJqhStniNKKZ22IwaRJFUmD81JkrIyRJKkrAyRJCkr774tSS048Kfdi7rek2Ne2qbtr5p4MW3btuPffvDdos5RbtwjkiRlZYgkqYxce9mlfGlgPWecOJSlzy8B4LnnnmPw4MH07t2bfv368fzzz2eesrg8NCdJZeLpJ+dz352/4pf3z2L9unWMOOYL7N+rD6effjoXXHABw4cPZ+3atWzYsCH3qEVliCSpTMz74yMMGvpFdtutLQCfP+oY1q5dy/Llyxk+fDgANTU1OUcsCQ/NSZKyMkSSVCYOGvA5Zt5/N2vXrOHtVW8x63f3UVNTQ7du3Zg+fToA77zzDqtXr848aXF5aE6SWrCtl1tvr569ejPkS8M5ZUgDn+zUiQN69wXghhtu4Mwzz+TCCy+kurqa22+/nX32Kb+7hH9YhkiSykjjud+k8dxvvu+5T3frwIwZMzJNVHoempMkZWWIJElZGSJJUlaGSJKUlSGSJGVliCRJWXn5tiS14PTfNxR1vZuOnL3V199cuZJ7p9/OqWeMKer3LXfuEUl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tRUS0Tymtioi2NO3ZjE0pzcs9l7Qz8RyRtHWTI2J/mi5SuN4IScXnHpEkKSvPEUmSsjJEkqSsDJEkKStDJEnKyhBJkrIyRJKkrP4P0b+EVCXQeQYAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.clf()\n",
    "df.groupby(['gender','state']).size().unstack().plot(kind='bar',stacked=True)\n",
    "plt.legend(loc='lower right')\n",
    "plt.gcf().set_size_inches(7,4)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "## plot histogram for dataframe column"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f2ed5b260b8>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD4CAYAAADhNOGaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAVl0lEQVR4nO3df5BdZZ3n8ffHEIkRBEJ6lc0Pk1kRVAYQOhFXR1kcFcUBXGQXa5xRyzFbs1Ci49YMsFuIWlM1VrnigLMyWWFFxlUU1I0KOwuKOloChhgREtSM40gjs7QBE0F+tX73j3vC9jTdyU3oc5vc835V3cr58Zx7v4fT9KfPc557TqoKSVJ3PWWuC5AkzS2DQJI6ziCQpI4zCCSp4wwCSeq4fea6gN21ePHiWrFixVyXIUl7lVtuueXnVTUy3bq9LghWrFjB+vXr57oMSdqrJPnHmdbZNSRJHWcQSFLHGQSS1HF73T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6Q368q+ou4IPAT+kFwDbgFob/eE820zF+Qr/vhjkIOifJfsDVwDuravvkdc0X9YZqrHCS1wH3VNUtc13LgO0DHAN8tKpeCDzAlG6gIT3eB9H7y3cl8C+Bp/P4rpPOmM1jPMxB0M8tLoZGkvn0QuCTVfW5ZvH/3XF62Px7z1zV15KXACcn+Qm9rr8T6PWdH9h0HcBwHvcxYKyqbmrmr6IXDMN+vH8X+IeqGq+qR4HP0fsZGPbjPdlMx/gJ/b4b5iDo5xYXQ6HpF78U2FxVH5q0avItPN4M/K9B19amqjq3qpZW1Qp6x/erVfX7wA30blkCw7nf/wTcmeSwZtErgE0M+fGm1yV0XJKFzc/8jv0e6uM9xUzHeB3wh83ooeOAbZO6kHatqob2BbwW+CHw98B/nut6WtzPl9I7RbwV2Ni8Xkuvv/wrwI+A64FFc11ri/8Njge+1Ez/FnAzsAX4LLDvXNfXwv4eDaxvjvkXgIO6cLyB9wJ3ALcBVwD7DuvxBj5F71rIo/TOAt820zEGQm+U5N8D36c3sqrvz/IWE5LUccPcNSRJ6oNBIEkdZxBIUscZBJLUcQaBJHWcQSBJHWcQSFLH/T+pwmNrukYpiQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df[['age']].plot(kind='hist',bins=[0,20,40,60,80,100],rwidth=0.9)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## stacked bar plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAaIAAAEFCAYAAAChEuM5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy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VCqDSJJUKoNIklSqTvuuOUna3Aw85fpO7W/xt4/otL4uuugi5syZww9+8APOP/98evbsybHHHst9993H0UcfTUQwY8YMdt111416nlNPPZUxY8YwduzYTqr8jQwiSXqTO/HEE1+7P3PmTD70oQ/x9a9/vaZtM5PMpFu3tifIvvGNb3RKjevj1JwkdSGXXHIJe+65J0OHDuWYY47h2muvZZ999mH48OGMHTuWp5566g3bTJ06le9973v86le/4uyzz+a8887jgAMOAODMM8+kpaWFlpYWzj77bAAWL17M7rvvzrHHHktLSwuzZ89m8ODBTJw4kT322IODDz6YlStXAjBhwgRmzJgBVEJp5MiRtLS0MGnSJDKzU/bZIJKkLmLBggWcccYZzJo1i3vuuYdzzjmHUaNGcfvtt3P33Xdz9NFH893vfned2x9++OGceOKJfPGLX+Tmm29m7ty5XHjhhdxxxx3cfvvt/OhHP+Luu+8GYNGiRUyePJkFCxawyy67sGjRIj7zmc+wYMEC+vbty9VXX/2G/k866ST+9Kc/ce+997Jy5Uquu+66Ttlvg0iSuohZs2Zx1FFH0a9fPwC23XZblixZwiGHHMKQIUOYNm0aCxYsqLm/2267jXHjxtGrVy969+7NBz7wAWbPng3ALrvswr777vta20GDBjFs2DAA9tprLxYvXvyG/m6++Wb22WcfhgwZwqxZszpUy/oYRJLUhX32s5/lpJNOYv78+VxwwQWsWrWqU/rt1avX6x5vueWWr93v3r07q1evft36VatWMXnyZGbMmMH8+fOZOHFip9ViEElSF3HggQdy1VVXsWzZMgCeffZZnn/+eXbaaScALr744g71N3r0aGbOnMlLL73Eiy++yDXXXMPo0aM3qLZXQ6dfv36sWLHitfNGncGr5iRpHTrzcuta7LHHHkyZMoV3v/vddO/eneHDhzN16lSOOuoo3vrWt3LggQfy8MMP19zfiBEjmDBhAnvvvTcAxx9/PMOHD29z2q09ffv2ZeLEibS0tLDDDju89hMVnSE666qHaq2trTlnzpxO71e16+zPP0hvZrUGysKFCxk8eHCdq9n8tXUcI2JuZra21d6pOUlSqQwiSVKpDCJJqlKP0xWNZEOOn0EkSYWmpiaWLVtmGG2gzGTZsmU0NTV1aDuvmpOkQv/+/VmyZAlLly4tu5Q3raamJvr379+hbQwiSSr06NGDQYMGlV1Gw6lpai4iDo2I+yPiwYg4pd5FSZIaR7tBFBHdgXOBw4B3AeMj4l31LkyS1BhqGRHtDTyYmX/NzH8CVwLvq29ZkqRGUcs5op2AR6seLwH2WbtRREwCJhUPV0TE/RtfniRtvPhO2RUI2GVdKzrtYoXMnA5M76z+JEmNoZapuceAnase9y+WSZK00WoJoj8B/ysiBkXEW4CjgV/WtyxJUqNod2ouM1dHxEnAr4HuwE8zs3N+lk+S1PDq8jMQUiOJiC8A0zPzpc5oJzUag0jaSBGxGGjNzGc6o53UaPzSU6kDIqJXRFwfEfdExL0RcRqwI3BzRNxctDkvIuZExIKIOL1Y9rk22h0cEX+MiLsi4qqI6F3WfkllckQkdUBEfBA4NDMnFo+3Ae6haqQTEdtm5rPFt5L8FvhcZv65ekQUEf2AXwCHZeaLEfFVYMvM/EYZ+yWVyRGR1DHzgfdExHciYnRmPt9Gmw9HxF3A3cAeVL4aa237Fst/HxHzgE+wng/8SZszv31b6oDMfCAiRgCHA2dExG+r10fEIOBkYGRm/j0iLgLa+nGWAG7KzPH1rlnq6hwRSR0QETsCL2XmZcA0YASwHOhTNNkaeBF4PiK2p/Jlwa+qbnc7sH9E/FvRb6+I2G0T7ILU5TgikjpmCDAtItYALwOfBvYDboiIxzPzgIi4G7iPync0/r5q2+lrtZsAXBERWxbrvw48sKl2ROoqvFhBklQqp+YkSaUyiCRJpTKIJEmlMogkSaUyiCRJpTKIJEmlMogkSaX6/5otEuMM13uZAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# create dummy variable them group by that\n",
    "# set the legend to false because we'll fix it later\n",
    "df.assign(\n",
    " dummy = 1   \n",
    ").groupby(['dummy','state']).size().to_frame().unstack().plot(kind='bar',stacked=True,legend=False)\n",
    "\n",
    "plt.title('Number of records by State')\n",
    "\n",
    "# other it'll show up as 'dummy' \n",
    "plt.xlabel('state')\n",
    "\n",
    "# disable ticks in the x axis\n",
    "plt.xticks([])\n",
    "\n",
    "# fix the legend\n",
    "current_handles, _ = plt.gca().get_legend_handles_labels()\n",
    "reversed_handles = reversed(current_handles)\n",
    "\n",
    "labels = reversed(df['state'].unique())\n",
    "\n",
    "plt.legend(reversed_handles,labels,loc='lower right')\n",
    "\n",
    "plt.gcf().set_size_inches(7,4)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Stacked bar plot percentages"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbgAAAEFCAYAAACRnvIYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAfuUlEQVR4nO3de5hVdd3+8fcNIudEAVFAhDCMx0EOgodLQFMKzSeFtNQ0IRU0UssnU0xTLCvLfqKppZgpHvAAJWVZaSKPaI8HDkNIaKCiDoIiCqJCQXx+f6zv6GacgTnsYWDN/bquuWat7/qutT9r7T1z73XYeykiMDMzy5smDV2AmZlZfXDAmZlZLjngzMwslxxwZmaWSw44MzPLJQecmZnlkgPOdnjK3CbpHUnPNHQ9WyJpgqS7ajHfUknD6qMmq57C50DSdyX9qsjLP1xSWTGX2dg54BoBSTPTP//mDV1LZSSNlvREHRYxGPgs0DUiDixSWbmV/jm/LOk9SWWS7iuYNlPSmTVYVq0Ce0cXET+KiGpvJ2sYDrick9QdGAIEcGyDFlN/9gaWRsT71eksaad6rmebPk5NSBoFf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TYOd6qMXMzBqpogdcRGwEzgH+AiwC7o+I8tuzfgOYHBEfAH8HWklaAMyJiNXFrsXMzBqvHeZ2OWaNjaRvAZPSG8I69zNrbBxwZtspSUuBgRHxVjH6mTU2/rJls+2ApNaS/ihpvqTnJF0OdAYek/RY6vNLSbMlLZR0RWo7r5J+n5P0f5LmSpoqqU1DrZdZQ/IenNl2QNLxwFERMSaN7wLMp2DPTNJuEfF2+ragR4HzIuLvhXtwkjoAvwWOjoj3JV0ENI+I7zfEepk1JO/BmW0fFgCflfQTSUMiYk0lfb4saS4wD9iP7KvwKjo4tT8pqRQYxRY+CGuWZ76bgNl2ICL+KWkA8HngSkmPFk6X1AO4ABgUEe9Iuh2o7OZYIvvihJPru2az7Z334My2A5I6Ax9ExF3A1cAAYC3QNnX5BPA+sEZSJ7IvMy9X2O8p4FBJ+6TltpbUaxusgtl2x3twZtuHPsDVkjYBG4CvA4cAf5b0ekR8RtI84Hmy73p9smDeSRX6jQbukdQ8Tb8U+Oe2WhGz7YUvMjEzs1zyIUozM8slB5yZmeWSA87MzHLJAWdmZrnkgDMzs1xywJmZWS454MzMLJf+P2nlxjQm7msBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 504x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import matplotlib.ticker as mtick\n",
    "\n",
    "# create dummy variable them group by that\n",
    "# set the legend to false because we'll fix it later\n",
    "df.assign(\n",
    " dummy = 1   \n",
    ").groupby(['dummy','state']).size().groupby(level=0).apply(\n",
    "    lambda x: 100 * x / x.sum()\n",
    ").to_frame().unstack().plot(kind='bar',stacked=True,legend=False)\n",
    "\n",
    "\n",
    "plt.title('Amount of records by State, normalized')\n",
    "\n",
    "\n",
    "# other it'll show up as 'dummy' \n",
    "plt.xlabel('state')\n",
    "\n",
    "# disable ticks in the x axis\n",
    "plt.xticks([])\n",
    "\n",
    "# fix the legend\n",
    "current_handles, _ = plt.gca().get_legend_handles_labels()\n",
    "reversed_handles = reversed(current_handles)\n",
    "\n",
    "labels = reversed(df['state'].unique())\n",
    "\n",
    "plt.legend(reversed_handles,labels,loc='lower right')\n",
    "\n",
    "plt.gcf().set_size_inches(7,4)\n",
    "plt.gca().yaxis.set_major_formatter(mtick.PercentFormatter())\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## percent, two-level group by"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbgAAAEVCAYAAACSSPCDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3deXgV9dnG8e8DRPaCAiKLCNWilLDFAPKyVEWKllZBxb2AC9TiVt9qpa9WocXWqpfgVrdWBSyo0ErVohULCmqxkhgERAtWkLCpKCoCCvK8f8wvcAg5JOQkOYfJ/bmuXMx+nhnOnHvmN3POmLsjIiISNzXSXYCIiEhlUMCJiEgsKeBERCSWFHAiIhJLCjgREYklBZyIiMSSAk7KzCKPmNmnZvbvdNezL2Y21sweK8d8K83spMqoqbKZ2Utmdkm66yhJJtd2oDKztmbmZlYr9D9nZsMr+DXKtR9lCgVcBQo78admVjvdtZTEzEaY2SspLKIPMABo7e49Kqis2DKzhmZ2RwjNL83sAzObYWY9011bJjGzxmb2sJmtN7MvzOw/ZjYmYbyb2VH7sbxqGabufoq7T0p3HZlEAVdBzKwt0Bdw4NS0FlN5jgBWuvuXZZm46MiyslXV6+yPcJAzB+gE/BD4FtABeBw4JY2l7SUDtt8EoAHR9mlEtP+sSGtFlSADtnP14+76q4A/4EbgVeAO4Nli4x4F/gA8B2wO0x0GTA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EjDhg1p27Yt0TN8ZX+4Oxs3bqSwsJB27dqluxypxtREKVLMtm3baNKkicKtnMyMJk2a6AxY0k4BJ1IChVtqtP0kEyjgREQklhRwIhlq4sSJbNmypcKmE6luFHAiGUoBJ5IaBZxIBvjyyy8ZNGgQXbp0ITs7m3HjxrF27VpOOOEETjjhBAB++tOfkpubS8eOHbnpppsAuOuuu/aa7oUXXqBXr17k5OQwdOhQNm/enLb1EkknBZxIBnj++edp2bIlixYtYsmSJfzsZz+jZcuWzJ07l7lz5wJw8803s3DhQt566y1efvll3nrrLa688so9pvv4448ZP348L774Ivn5+eTm5nLHHXekee1E0kMBJ5IBOnXqxOzZs7nuuuuYP38+jRo12muaJ598kpycHLp168bSpUt5++2395pmwYIFvP322/Tu3ZuuXbsyadIkVq1aVRWrIJJx9EVvkQzQvn178vPzmTVrFjfccAP9+/ffY/z777/P7bffzhtvvMHBBx/MiBEjSvyembszYMAApk2bVlWli2QsncGJZIC1a9dSr149LrjgAq699lry8/Np2LAhX3zxBQCff/459evXp1GjRmzYsIHnnntu17yJ0x133HG8+uqrrFixAoiu7f3nP/+p+hUSyQA6gxPJAIsXL+baa6+lRo0aZGVlcd999/Gvf/2Lk08+edc1tm7dunHMMcdw+OGH07t3713zjho1ao/pHn30Uc4991y++uorAMaPH0/79u3TtWoiaWPunu4ayiQ3N9cXLlyY7jJSM3bv6yqSBmM/2+foZcuW0aFDhyoqJr5K245tx/y9CquRkqy8ZVC6S0iZmeW5e25J49REKSIisaSAExGRWFLAiYhILCngREQklhRwIiISSwo4ERGJJX0PTqQUnSZ1qtDlLR6+eJ/jN23axNSpUxk9enSFvq5IdaMzOJEMs2nTJv7whz+kuwyRA54CTiTDjBkzhvfee4+uXbty7bXXctttt9G9e3c6d+686zE5Tz31FP3798fdWbduHe3bt2f9+vWsXLmSvn37kpOTQ05ODq+99hoA69ato1+/fnTt2pXs7Gzmz5+fzlUUqRLlDjgzO9zM5prZ22a21MyuCsMPMbPZZrY8/HtwGH5GmG6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XTEREJJYUcCIiEksKOBERiSU9LkekNBX99Y5Svqaw1+Rjx9KgQQOuueaaiq1DJOZ0BiciIrGkgBPJQDfffDPt27enT58+vPvuuwCsWLGCk046iS5dupCTk8N7772X5ipFMpuaKEUyTF5eHo8//jgFBQXs2LGDnJwcjj32WM4//3zGjBnDkCFD2LZt264fWBaRkingRDLM/PnzGTJkCPXqRT/uc+qpp7J161bWrFnDkCFDAKhTp046SxQ5IKiJUkREYkkBJ5Jh+vXrx8yZM9m6dStffPEFzzzzDHXr1qV169bMnDkTgK+++ootW7aUsiSR6k1NlCKl2c/b+lOVk5PD2WefTZcuXTj00EPp3r07AFOmTOEnP/kJN954I1lZWUyfPp1vf/vbVVqbyIFEASeSga6//nquv/76vYbPmTMnDdWIHJjURCkiIrGkgBMRkVhSwImISCwp4EREJJYUcCIiEksKOBERiSV9TUCkFG3H/L1Cl7fylkEVtqxHH32UhQsXcs8993D//fdTr149hg0bxjvvvMM555yDmTFjxgyOPPLIlF7nxhtvpF+/fpx00kkVVLlI5VPAicTEpZdeuqt75syZnHnmmdxwww1lmtfdcXdq1Ci5UefXv/51hdQoUpXURCmSgSZPnkznzp3p0qULP/7xj3nmmWfo2bMn3bp146STTmLDhg17zTN27Fhuv/12Zs2axcSJE7nvvvs44YQTALjjjjvIzs4mOzubiRMnArBy5UqOPvpohg0bRnZ2NvPnz6dDhw6MHDmSjh078v3vf5+tW7cCMGLECGbMmAFEYde9e3eys7MZNWoU7l5FW0Vk/yjgRDLM0qVLGT9+PHPmzGHRokXceeed9OnThwULFvDmm29yzjnncOuttyad/wc/+AGXXnopV199NXPnziUvL49HHnmE119/nQULFvDQQw/x5ptvArB8+XJGjx7N0qVLOeKII1i+fDmXXXYZS5cupXHjxvzlL3/Za/mXX345b7zxBkuWLGHr1q08++yzlbYtRFKhgBPJMHPmzGHo0KE0bdoUgEMOOYTCwkIGDhxIp06duO2221i6dGmZl/fKK68wZMgQ6tevT4MGDTj99NOZP38+AEcccQTHHXfcrmnbt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l2DiEh56SYTScrM8t09J3T/xd3PSHdNIulgZk/va7y7n1pVtUjZ6XE5si+Jv2n17bRVIZJ+vYh+gnAa8Dp77huSoRRwsi+epFukujkMGACcC5wH/B2YlvAdX8lAaqKUpMzsG+BLoqPVusCWolGAu/u30lWbSLqYWW2ioLsNGOfu96S5JElCZ3CSlLvXTHcNIpkiBNsgonBrC9wFPJXOmmTfdAYnIlIKM5sMZAOzgMfdfUmaS5IyUMCJiJTCzHYSNdfDntej1VyfwRRwIiISS/qit4iIxJICTkREYkkBJxIDZvaomZ2Z7jpEMokCTqQaMjN9RUhiTwEnUsXM7Fdm9q6ZvWJm08zsGjM70syeN7M8M5tvZseEaR81s7vM7DUz+2/RWZpF7gnLeRE4NGH5x5rZy2FZ/zCzFmH4S2Y20cwWAlelY91FqpKO4kSqkJl1B84AugBZQD6QBzwIXOruy82sJ/AH4MQwWwugD3AM8DQwAxgCHA18F2gOvA08bGZZwN3Aae7+kZmdDdwMXBSWdZC751b6iopkAAWcSNXqDfzN3bcB28zsGaAO8D/AdLNdv+FbO2Geme6+E3jbzJqHYf2IfgvxG2Ctmc0Jw48m+kLy7LCsmsC6hGU9UQnrJJKRFHAi6VcD2OTuXZOM/yqhu7RfsTdgqbv3SjL+yyTDRWJH1+BEqtarwI/MrI6ZNQB+SPQj1u+b2VDYdX2tSynLmQecbWY1wzW2E8Lwd4FmZtYrLCvLzDpWypqIZDgFnEgVcvc3iK6jvQU8BywGPgPOBy42s0XAUuC0Uhb1FLCc6NrbZOBfYflfA2cCvw/LKiBq/hSpdvRTXSJVzMwauPtmM6tHdCY2yt3z012XSNzoGpxI1XvQzL5LdHPJJIWbSOXQGZyIiMSSrsGJiEgsKeBERCSWFHAiIhJLCjgREYklBZyIiMSSAk5ERGLp/wH3/i0kxrPzUAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 504x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.ticker as mtick\n",
    "\n",
    "df.groupby(['gender','state']).size().groupby(level=0).apply(\n",
    "    lambda x: 100 * x / x.sum()\n",
    ").unstack().plot(kind='bar',stacked=True,legend='reverse')\n",
    "\n",
    "plt.gca().yaxis.set_major_formatter(mtick.PercentFormatter())\n",
    "plt.title('Amount of records by Gender and State, normalized')\n",
    "# plt.legend(loc='lower right')\n",
    "plt.gcf().set_size_inches(7,4)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### date histograms"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>date_of_birth</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>john</td>\n",
       "      <td>01/21/1988</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>lisa</td>\n",
       "      <td>03/10/1977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>peter</td>\n",
       "      <td>07/25/1999</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>carl</td>\n",
       "      <td>01/22/1977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>linda</td>\n",
       "      <td>09/30/1968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>betty</td>\n",
       "      <td>09/15/1970</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    name date_of_birth\n",
       "0   john    01/21/1988\n",
       "1   lisa    03/10/1977\n",
       "2  peter    07/25/1999\n",
       "3   carl    01/22/1977\n",
       "4  linda    09/30/1968\n",
       "5  betty    09/15/1970"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'name':['john','lisa','peter','carl','linda','betty'],\n",
    "    'date_of_birth':[\n",
    "        '01/21/1988','03/10/1977','07/25/1999','01/22/1977','09/30/1968','09/15/1970'\n",
    "    ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "df['date_of_birth'] = pd.to_datetime(df['date_of_birth'],infer_datetime_format=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "name                     object\n",
       "date_of_birth    datetime64[ns]\n",
       "dtype: object"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.dtypes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAYnElEQVR4nO3de7RedZ3f8feHBOUiCpjoUJIQtCwFlZvHMDN4wVEw3kCrU0PVoksn01FmdOyaFqwLFKddWDvqODpKiingBVQuNjNGIY53L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uc17Q87Akjyj0mOa5bvSfLBZn7/ryVZ1FfPiX27n9+035rkzL59vaH5vmuTnDMaBs1+/ybJD4Ghv/tB058BoV3ZRcCS5sUuh/PwGXHfB/ygqg4H3g1c0Lft6cBL6M2ZdGYzL9Zp9KaePrKq/qrpdxTwTuAw4Cn0noBvM7uqFjV9zxynT7+96U0X8gzgbuCv6R0BvRo4q6/fIuA1zd/tj5OMJDkUeB1wbDOp4oPA6/v2e1VVHVFV3x2gDs1wM36qDe26quq6Zrr0k+kdTfR7Lr0frlTV15vpkh/fbPtyVd0P3J9kE73pMtpcXVUbAJopURbSe6nMWKOTLa5t+mzP6ItfAK4H7q+q3yS5fsz4VVV1R/P9lzZ/p63As4HVzQHNnvSmZodeWFwywPdLgAGhXd8KevP4Hwc8ccAx9/ctP8j4/59MtF9/n608/Ai+//WVv6nfzYHz0Oj4qnqoeVnNqLHz5BQQ4PyqOr2ljv9XVVM2FbR2fZ5i0q5uOfC+qrp+TPt3aE69NOf+f7mdd27cDewzhXXdBhyZZLck85ncFODHN9dS9gReBXwP+CfgtX0zfO6f5KCpKlozi0cQ2qU1p4A+2rLpvcDyJNcB9wKnbGc/dyT5XpIbgK8AX97B0r4H/ITeFNs305sldKKupnfKaB7wmapaA5DkPfTeYLcbzQyfwHR5baceRZzNVZLUylNMkqRWBoQkqZUBIUlqZUBIkloZEJKkVgaEJKmVASFJavX/AUHCmP0wNqjmAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.clf()\n",
    "df['date_of_birth'].map(lambda d: d.month).plot(kind='hist')\n",
    "plt.xlabel('Month number')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
